HAL MDF state and error functions migration ¶
This section provides information about the HAL MDF state and error functions migration.
Note
In HAL1, a single driver handles both MDF and ADF peripherals.
In HAL2, the HAL MDF driver has been split into two separate drivers HAL MDF and HAL ADF. For more details, see : MDF specific concept.
HAL MDF get state ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_MDF_GetState()
|
HAL_MDF_GetState(const hal_mdf_handle_t *hmdf)
HAL_ADF_GetState(const hal_adf_handle_t *hadf)
|
Note
For MDF, new API has been provided to get the specified serial interface, short-circuit detector, digital filter and out-of-limit detector state :
HAL_MDF_SITF_GetState(const hal_mdf_handle_t *hmdf,
hal_mdf_block_index_t serial_interface_index)
HAL_MDF_SCD_GetState(const hal_mdf_handle_t *hmdf,
hal_mdf_block_index_t short_circuit_detector_index)
HAL_MDF_DFLT_GetState(const hal_mdf_handle_t *hmdf,
hal_mdf_block_index_t digital_filter_index)
HAL_MDF_OLD_GetState(const hal_mdf_handle_t *hmdf,
hal_mdf_block_index_t out_of_limit_detector_index)
For ADF, new API has been provided to get the specified serial interface, digital filter, and sound activity detector state :
HAL_ADF_SITF_GetState(const hal_adf_handle_t *hadf,
hal_adf_block_index_t serial_interface_index)
HAL_ADF_DFLT_GetState(const hal_adf_handle_t *hadf,
hal_adf_block_index_t digital_filter_index)
HAL_ADF_SAD_GetState(const hal_adf_handle_t *hadf,
hal_adf_block_index_t sound_activity_detector_index)
Related concept: Revised and optimized HAL state machine
HAL MDF get error code ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_MDF_GetError()
|
HAL_MDF_GetLastErrorCodes(const hal_mdf_handle_t *hmdf,
hal_mdf_block_index_t block_index)
HAL_ADF_GetLastErrorCodes(const hal_adf_handle_t *hadf,
hal_adf_block_index_t block_index)
|